package enemies;

import java.util.LinkedList;
import java.util.List;

import mapControl.GraphicsMapControl;
import elementos.Player;
import enemies.factory.Barracks;
import enemies.factory.builders.AltairEnemyBuilder;
import enemies.factory.builders.EnemyBuilder;
import enemies.factory.builders.RugulusEnemyBuilder;
import enemies.factory.builders.SiruisEnemyBuilder;

public class Bad_Boys {

	List<Enemy> collectionEnemies;

	public Bad_Boys(GraphicsMapControl mapControl, Player player) {

		Barracks barracks = new Barracks(mapControl, player);
		EnemyBuilder rugulusEnemyBuilder = new RugulusEnemyBuilder();
		EnemyBuilder altairEnemyBuilder = new AltairEnemyBuilder();
		EnemyBuilder siruisEnemyBuilder = new SiruisEnemyBuilder();

		collectionEnemies = new LinkedList<Enemy>();

		barracks.setEnemyBuilder(rugulusEnemyBuilder);

		barracks.construct();
		collectionEnemies.add(barracks.startAndGetEnemy());

		barracks.construct();
		collectionEnemies.add(barracks.startAndGetEnemy());

		barracks.construct();
		collectionEnemies.add(barracks.startAndGetEnemy());

		barracks.construct();
		collectionEnemies.add(barracks.startAndGetEnemy());

		barracks.setEnemyBuilder(altairEnemyBuilder);

		barracks.construct();
		collectionEnemies.add(barracks.startAndGetEnemy());

		barracks.construct();
		collectionEnemies.add(barracks.startAndGetEnemy());

		barracks.setEnemyBuilder(siruisEnemyBuilder);

		barracks.construct();
		collectionEnemies.add(barracks.startAndGetEnemy());

		for (Enemy e : collectionEnemies) {
			Thread t = new Thread(e);
			t.start();
		}

	}

	public List<Enemy> getCollectionEnemies() {
		return collectionEnemies;
	}

}
